﻿using NP.BPMReportPlatform.Entities.BPM_Business;
using NP.BPMReportPlatform.HR.Dto;
using NP.BPMReportPlatform.Leave.Dto;
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace NP.BPMReportPlatform.Leave
{
    /// <summary>
    /// 请休假接口服务
    /// </summary>
    public interface ILeaveService : IApplicationService
    {
        /// <summary>
        /// 试用期员结果汇总查询数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<GetLeaveResultOutput>> GetLeaveResult(GetLeaveResultInput input);

        /// <summary>
        /// 导出请休假信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<MemoryStream> ExportLeaveResultAsync(GetLeaveResultInput input);

        /// <summary>
        /// SAP补推
        /// </summary>
        /// <param name="instanceNumber"></param>
        /// <param name="processType"></param>
        /// <returns></returns>
        Task<string> PushSAPAsync(string instanceNumber, string processType);

        #region 特殊审批流配置

        /// <summary>
        /// 特殊审批人信息查询
        /// </summary>
        /// <param name="input"></param>
        Task<PagedResultDto<LeaveSpecialApproverEntity>> GetSpecialApproverAsync(GetSpecialLeaveResultInput input);

        /// <summary>
        /// 审批信息导入 导入Excel
        /// </summary>
        /// <param name="bytes"></param>
        /// <returns></returns>
        Task<ImportResultExt<SpecialApproverDto.ImportInput>> ImporterExcelAsync(byte[] bytes);

        /// <summary>
        /// 保存审批配置
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task EditAsync(LeaveSpecialApproverEntity input);

        /// <summary>
        /// 删除审批配置
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(string id);

        #endregion
    }
}